import axiosData from "@/api/axios";

export default {
  /**
   * @description: 获取设备故障上报列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {} *
   * @return {Array}
   */
  queryPageList(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchApplyAudit/queryPageList",
      params
    );
  },
  /**
   * @description: 新增设备故障上报
   * @param {Object} params *
   * @return {Object}
   */
  add(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchApplyAudit/addApply",
      params
    );
  },
  /**
   * @description: 编辑设备故障上报
   * @param {Object} params *
   * @return {Object}
   */
  edit(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchApplyAudit/editApply",
      params
    );
  },
  /**
   * @description: 批量删除设备故障上报
   * @param {Object} hitchApplyAuditCodeList *
   * @return {Object}
   */
  delList(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchApplyAudit/delByHitchApplyAuditCodeList",
      params
    );
  },
  /**
   * @description: 根据获取图片
   * @param {Object} hitchInfoCode *
   * @return {Object}
   */
  queryByHitchInfoId(params) {
    return axiosData.get(
      `/v3/equipment-hitch/v1/hitchPicture/queryByHitchInfoId?hitchInfoCode=${params}`,
      params
    );
  },
  /**
   * @description: 图片影像添加（多文件添加
   * @param {Object} params *
   * @return {Object}
   */
  addPicture(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchPicture/add", params);
  },
  /**
   * @description: 修改图片影像（多文件）
   * @param {Object} params *
   * @return {Object}
   */
  editPicture(params) {
    return axiosData.post("/v3/equipment-hitch/v1/hitchPicture/edit", params);
  },
  /**
   * @description: 根据图片/影视编码删除图片
   * @param {Object} hitchInfoCode *
   * @return {Object}
   */
  delByHitchPictureCode(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchPicture/delByHitchPictureCodeList",
      params
    );
  },
  /**
   * @description: 故障关键字编码查询
   * @param {Object} params *
   * @return {Object}
   */
  queryByHitchKeywordCode(params) {
    return axiosData.get(
      `/v3/equipment-hitch/v1/hitchKeyword/queryByHitchKeywordCode?hitchKeywordCode=${params}`
    );
  },
  // /**
  //  * @description: 根据任务编码获取影像
  //  * @param {Object} params *
  //  * @return {Object}
  //  */
  // queryVByRepairTaskId(params) {
  //   return axiosData.GET("/v3/equipment-hitch/v1/hitchVideo/queryByRepairTaskId", params);
  // },
  // /**
  //  * @description: 影像添加（多文件添加
  //  * @param {Object} params *
  //  * @return {Object}
  //  */
  // addVideo(params) {
  //   return axiosData.post("/v3/equipment-hitch/v1/hitchVideo/add", params);
  // },
  // /**
  //  * @description: 修改影像（多文件）
  //  * @param {Object} params *
  //  * @return {Object}
  //  */
  // editVideo(params) {
  //   return axiosData.post("/v3/equipment-hitch/v1/hitchVideo/edit", params);
  // }
  /**
   * @description: 视频绑定故障
   * @param {Object} params *
   * @return {Object}
   */
  videoBindHitch(params) {
    return axiosData.post(
      "/v3/equipment-hitch/v1/hitchInfo/bindHitchInfoAndVideo",
      params
    );
  },
  /**
   * @description: 获取维修申请相关视频
   * @param {Object} params *
   * @return {Object}
   */
  queryBindVideos(params) {
    return axiosData.get(
      `/v3/equipment-hitch/v1/hitchInfo/getVideoListByHitchInfoCode?hitchInfoCode=${params}`
    );
  },
  /**
   * @description 撤销所有审核
   */
  revokeAudit(params) {
    return axiosData.get(
      `/v3/equipment-hitch/v1/hitchApplyAudit/revokeByHitchApplyAuditCode?hitchApplyAuditCode=${params}`
    );
  },
  /**
   * @description: 获取维修视频
   * @param {} params
   */
  queryRepairVideos(params) {
    return axiosData.get(`/v3/equipment-hitch/v1/repairRecord/getRepairVideoByRepairRecordCode?repairRecordCode=${params}`)
  }
};
